package com.jx.jpaQuery;

import java.io.Serializable;

import javax.persistence.criteria.Predicate.BooleanOperator;

import com.jx.enumType.SQLSepEnum;

/**
 * <p>分装分页查询的条件�??
 * <p>po对象属�?�名对应条件 EQ�? 对应页面传入的�??
 * <p>{@link String name <tt>po属�?�，�?要查询的字段属�??</tt>}
 * <p>{@link SQLSepEnum operator <tt>条件</tt>}
 * <p>{@link String value <tt>�?</tt>}
 * 
 * @author <h1>jiangxu2  2019�?11�?20�?</h1>
 * @version v1.11.20.2019
 * @since 1.0
 * @see #ConditionField(String, SQLSepEnum, String) 构�?�函数ConditionField(String, SQLSepEnum, String)
 * @see #ConditionField() 无惨构�?�函数ConditionField()
 */
public class ConditionField  implements Serializable{
	
	private static final long serialVersionUID = -2616153464735052324L;
	
	/** <p>属�?? <p>{@link String name}  <p>pojo对象的属性一�?*/
    private String name;

    /** <p>类似sql中的判断 <p>{@link SQLSepEnum operator}  <p>EQ,LIKE,RLIKE,LLIKE*/
    private SQLSepEnum operator;

    /** <p>�? <p>{@link String value}  <p>条件的�?�传�?*/
    private String value;
    
    private BooleanOperator operAndOr;

    /** <p>无惨构�?�函�?*/
    public ConditionField() {
    }

    /** <p>构�?�函�?<p>{@link String name}<p>{@link SQLSepEnum operator}<p>{@link String value}*/
    public ConditionField(String name, SQLSepEnum operator, String value) {
        this.name = name;
        this.operator = operator;
        this.value = value;
        this.operAndOr=BooleanOperator.AND;
    }
    
    public ConditionField(String name, SQLSepEnum operator, String value,BooleanOperator operAndOr) {
        this.name = name;
        this.operator = operator;
        this.value = value;
        this.operAndOr=operAndOr;
    }

    /** <p>{@link BooleanOperator BooleanOperator getOperAndOr()*/
	public BooleanOperator getOperAndOr() {
		return operAndOr;
	}

	/** <p>setOperAndOr({@link BooleanOperator BooleanOperator operAndOr})*/
	public void setOperAndOr(BooleanOperator operAndOr) {
		this.operAndOr = operAndOr;
	}

	/** <p>{@link String String}<p>getName()*/
	public String getName() {
		return name;
	}
	
	/** <p>{@link SQLSepEnum SQLSepEnum}<p>getOperator()*/
	public SQLSepEnum getOperator() {
		return operator;
	}
	
	/** <p>{@link String String}<p>getValue()*/
	public String getValue() {
		return value;
	}

	/** <p>setName({@link String name})*/
	public void setName(String name) {
		this.name = name;
	}

	/** <p>setOperator({@link SQLSepEnum operator})*/
	public void setOperator(SQLSepEnum operator) {
		this.operator = operator;
	}

	/** <p>setValue({@link String value})*/
	public void setValue(String value) {
		this.value = value;
	}
    
}
